// @Date         2021-11-17
// @Author       Aaron Zhang
// @Description
// @FileName      console.go

package log

import (
	"zin/framework/contract"
	"os"
)

type providerServiceLogConsole struct {
	ProviderServiceLog
}

func NewProviderServiceLogConsole(param map[string]interface{}) (interface{}, error) {
	p := &providerServiceLogConsole{}

	p.SetFormatter(param["formatter"].(contract.Formatter))
	p.SetLevel(param["level"].(contract.LogLevel))
	p.SetCtxFielder(param["ctxFielder"].(contract.CtxFielder))

	p.SetOutput(os.Stdout)
	return p, nil
}
